#include <iostream>
using namespace std;

//1. 结构体中即可以定义成员变量，也可以定义成员函数
struct Student
{
    string mName;
    int mAge;
    void setName(string name) { mName = name; }
    void setAge(int age) { mAge = age; }
    void showStudent()
    {
        cout << "Name:" << mName << " Age:" << mAge << endl;
    }
};
//新增bool类型
void test(){
    cout<< sizeof(false)<<"/n"<<endl;
    bool flag = true;
     cout<< flag<<"/n"<<endl;
   
}

////2. c++中定义结构体变量不需要加struct关键字
int main()
{
    cout << "hello" << endl;
    Student student ;
    student.setName("ceshi");
    student.setAge(12);
    student.showStudent();

    test();
    system("pause");
    return 0;
}